package com.sse.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
 * @title: SsePushThreadPoolConfig
 * @Author xu-xiang
 * @Date: 2024/1/26 15:07
 * @description:
 */
@Configuration
public class SsePushThreadPoolConfig {

    /**
     * 定时消息推送线程池, 可替换XXL-job
     */
    @Bean
    public ScheduledExecutorService threadPoolExecutor() {
        return Executors.newScheduledThreadPool(10);
    }
}
